Skip to content

Ignore node_modules directories by default - #905

Open
marcoeangeli wants to merge 3 commits into
python-rope:masterfrom
marcoeangeli:fix/ignore-node-modules-by-default
Open

marcoeangeli wants to merge 3 commits into
python-rope:masterfrom
marcoeangeli:fix/ignore-node-modules-by-default

Conversation

@marcoeangeli

@marcoeangeli marcoeangeli commented Oct 17, 2026 •

Copy link
Copy Markdown

Description

Summary: Ignore node_modules directories by default so projects containing Python and JavaScript avoid scanning frontend dependencies during file enumeration and source-folder discovery.

I did not add any tests as I did not find existing tests for the other ignored directories + I think these changes are trivial. Happy to add some if needed though.

Motivation

This surfaced as an issue for me in Emacs: When Emacs/python-lsp/pylsp-rope checked what code actions were available, it entered Rope's source-folder scan, and (due to scanning the node_modules directory in my project) took a long time and blocked other LSP requests I made (such as going to definition for a symbol).

Adding node_modules to ignored_resources reduced code-action responses significantly, fixing the issue. I thought making the fix upstream would be good in case others run into similar issues.

Related discussion: #869 (comment).

Checklist

  • I have updated CHANGELOG.md
  • I have made corresponding changes to user documentation for new features

@marcoeangeli
marcoeangeli marked this pull request as ready for review October 17, 2026 15:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant